/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.service.impl;

import java.util.List;

import com.legendshop.dao.support.CriteriaQuery;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.dao.ProjectCostDao;
import com.legendshop.oa.model.ProjectCost;
import com.legendshop.oa.service.ProjectCostService;
import com.legendshop.util.AppUtils;

/**
 * The Class ProjectCostServiceImpl.
 *  项目费用表服务实现类
 */
public class ProjectCostServiceImpl  implements ProjectCostService{
   
   /**
     *
     * 引用的项目费用表Dao接口
     */
    private ProjectCostDao projectCostDao;

    public void setProjectCostDao(ProjectCostDao projectCostDao) {
        this.projectCostDao = projectCostDao;
    }

	/**
	 *  根据商城获取项目费用表列表
	 */
    public List<ProjectCost> getProjectCost(String userName) {
        return projectCostDao.getProjectCost(userName);
    }

   	/**
	 *  根据Id获取项目费用表
	 */
    public ProjectCost getProjectCost(Long id) {
        return projectCostDao.getProjectCost(id);
    }

   /**
	 *  删除项目费用表
	 */ 
    public void deleteProjectCost(ProjectCost projectCost) {
        projectCostDao.deleteProjectCost(projectCost);
    }

   /**
	 *  保存项目费用表
	 */	    
    public Long saveProjectCost(ProjectCost projectCost) {
        if (!AppUtils.isBlank(projectCost.getId())) {
            updateProjectCost(projectCost);
            return projectCost.getId();
        }
        return projectCostDao.saveProjectCost(projectCost);
    }

   /**
	 *  更新项目费用表
	 */	
    public void updateProjectCost(ProjectCost projectCost) {
        projectCostDao.updateProjectCost(projectCost);
    }

}
